Document
Pada halaman Employee Document ini Anda dapat menggunakan metode :
POST
Add new Document
Tujuan : Untuk menambahkan dokumen baru yang dimiliki oleh seorang Karyawan
Method : POST
API Endpoint : `[[baseurl]]/api/integration/v1/employee/documents`
HEADER
X-TenantID: [[tenantid]]
Authorization: Bearer [[accesstoken]]
Untuk mengetahui [[baseurl]], dan [[tenantid]], Anda dapat
mempelajarinya pada halaman
Integration Credential.
Dan untuk [[accesstoken]] dapat dipelajari pada halaman Authorization Token.
BODY PAYLOAD (FORM-DATA)
file: file.jpg
document: {
"employeeNo": "1219003",
"name": "Setifikat 1",
"documentType": "test",
"description": "Sertifikat 1",
"issueDate": "2021-02-01",
"expirationDate": "2021-10-01",
"active": true
}
CONSUME VIA CURL
curl --location --request POST '[[baseurl]]/api/integration/v1/employee/documents' \
--header 'X-TenantID: [[tenantid]]' \
--header 'Authorization: Bearer [[accesstoken]]' \
--form 'file=@"/D:/GIT-BE/DOCUMENTATION/install JDK-11.png"' \
--form 'document="{\"employeeNo\":\"0820020\",\"name\":\"CobaCOba3\",\"documentType\" : \"test200\",\"description\":\"Sertifikat 2\",\"issueDate\":\"2021-03-01\",\"expirationDate\":\"2021-11-01\",\"active\":false}"'
API Response :
{
"message": "Create Data Successfully",
"error": false
}
GET
Get detail Employee Documents with employeeNo parameter
Tujuan : Untuk mendapatkan detail dokumen yang dimiliki Karyawan dengan parameter employeeNo
Method : GET
API Endpoint : `[[baseurl]]/api/integration/v1/employee/documents?active=[[value]]&employeeNo=[[employeenumber]]`
Parameter [[value]] diisi dengan "true" jika data karyawan tersebut aktif atau "false" jika data karyawan tersebut tidak aktif.
Dan parameter [[employeenumber]] diisi dengan nomor karyawan yang diinginkan.
HEADER
X-TenantID: [[tenantid]]
Authorization: Bearer [[accesstoken]]
CONSUME VIA CURL
curl --location --request GET '[[baseurl]]/api/integration/v1/employee/documents?active=[[value]]&employeeNo=[[employeenumber]]' \
--header 'X-TenantID: [[tenantid]]' \
--header 'Authorization: Bearer [[accesstoken]]'
Untuk mengetahui [[baseurl]], dan [[tenantid]], Anda dapat mempelajarinya pada halaman
Integration Credential.
Dan untuk [[accesstoken]] dapat dipelajari pada halaman Authorization Token.
API Response :
[
{
"employeeId": "eba2b46b-929c-11eb-97ce-0adbcc9eaaa8",
"employeeNo": "1219003",
"details": [
{
"id": "00f5a7ed-5614-4882-98e8-7e17cc3212df",
"name": "document3",
"documentType": null,
"description": "test add doc 3",
"file": "document/b1794e99-929d-11eb-97ce-0adbcc9eaaa8_F2LWgmeQbG.pdf",
"sizeInBytes": 287325,
"issueDate": "2021-04-21",
"expirationDate": null,
"active": true
},
{
"id": "c15f9756-650b-4ed2-9ba5-80e20de11b0f",
"name": "document3",
"documentType": null,
"description": "test add doc 3",
"file": "document/b1794e99-929d-11eb-97ce-0adbcc9eaaa8_35HREtgoto.pdf",
"sizeInBytes": 13264,
"issueDate": "2021-04-21",
"expirationDate": null,
"active": true
}
]
}
]